1. Field of the Invention
The invention relates to the field of computer microcontrollers and more particularly to the field of programmable brown-out detection in a microcontroller environment.
2. Description of Background Art
Recent advances in technology have led to an increase in performance and a decrease in size of semiconductor microcontroller or microprocessor chips. Microcontrollers are devices that can control the operation of many items, e.g., braking systems in automobiles, automatic water sprinklers, and cellular telephones. Microcontrollers generally receive power from a supply voltage that is external to the microcontroller. In order to ensure proper operation, many conventional microcontrollers employ a brown-out detection system for detecting drops in the voltage level of a signal received from the supply voltage.
Brown-out detection systems detect when a supply voltage level drops below a minimum level that is necessary for proper operation of the microcontroller and/or the item using the microcontroller. Brown-out detection systems protect the microcontroller against total power failure and against "dips" in the received voltage signal.
In some conventional brown-out systems the received voltage signal is compared with a predetermined voltage reference signal. If the received voltage signal drops below the predetermined voltage reference signal the microcontroller issues a reset signal which ensures that the microcontroller will not operate with a low input voltage which, otherwise, can result in a malfunction of the microcontroller. A problem with such conventional systems is the requirement that the reference voltage and the ratio between the supply voltage and a voltage supply comparison voltage be predetermined.
Another problem with conventional brown-out detection systems is that they are not capable of distinguishing between a real brown-out condition from mere signal noise without expensive circuitry which requires additional elements, e.g., hysteresis logic. As an example, a true brown-out event may correspond to a sustained drop in the level of the received voltage signal or may correspond to a fast deep drop in the voltage signal level. However, transitory noise from input/output (I/O) switching, for example, can cause relatively shallow dips of the supply voltage which drop below the reference voltage and quickly return to an acceptable voltage level. Conventional brown-out detection circuits immediately initiates a microcontroller reset after the first instance of the voltage level dropping below the voltage reference. The operation of the microcontroller begins again only if the received voltage signal level exceeds the reference voltage after the expiration of a set period. Such conventional systems cause an unnecessary disruption in the microcontroller operation.
Some conventional systems disclose a device that purports to distinguish between real brown-out events and transitory voltage swings. However, such systems require expensive logic including multiple filters and hysteresis. Specifically, U.S. Pat. No. 5,606,511 to Yach (hereafter referred to as "Yach"), which is incorporated by reference herein in its entirety, describes a brown-out detection system that purports to distinguish between real brown-out conditions and transitory noise signals. Yach describes a system in which at least two voltages are sampled and filtered from the voltage supply signal (V.sub.DD), see FIG. 2, 5A, and 5B in Yach, for example. Yach requires two separate filtered voltage sample signals (V1 and V2). The V1 signal is filtered once and the V2 signal is filtered twice, see FIGS. 5A and 5B in Yach. The voltage level of V1 and V2 with respect to V.sub.DD is based solely upon the filters and upon the resistors 36, 37, and 38 in FIG. 5B, i.e., the values of V1 and V2 are not programmable and are used merely to provide hysteresis boundaries. The hysteresis voltages (V1, V2) are both compared to a reference voltage and a reset signal is only generated if the voltage level of both V1 and V2 are less than the reference voltage. Similarly, the Yach system only clears the reset (begins normal operation) after the voltage level of both V1 and V2 exceed the reference voltage. Yach states beginning at column 2, line 53 that "h!ysteresis greatly assists the dual comparator to distinguish a true brown-out event from normal noise or other slight perturbations, and is achieved be dual sampling of the power supply and establishing a pair of trip points for comparison with excursion of the supply voltage level." It is apparent that the Yach system is a complex and expensive technique.
What is needed is a system and method: (1) for detecting brown-out conditions in a microcontroller; (2) for enabling a user to program the brown out detection system; and (3) for distinguishing between real brown-out events and transitory voltage swings without requiring expensive and time consuming logic.